{
 "cells": [
  {
   "cell_type": "code",
   "id": "initial_id",
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "is_executing": true
    }
   },
   "source": [
    "from sklearn.neural_network import MLPClassifier\n",
    "\n",
    "X = [[0, 0],\n",
    "     [1, 1]]\n",
    "y = [0,\n",
    "     1]\n",
    "clf = MLPClassifier(solver='sgd', alpha=1e-5, activation='relu',\n",
    "                    hidden_layer_sizes=(5, 2), max_iter=2000, tol=1e-4)\n",
    "clf.fit(X, y)\n",
    "predicted_value = clf.predict([[2, 2],\n",
    "                               [-1, -2]])\n",
    "print(predicted_value)\n",
    "predicted_proba = clf.predict_proba([[2., 2.],\n",
    "                                     [-1., -2.]])\n",
    "print(predicted_proba)\n",
    "print([coef.shape for coef in clf.coefs_])\n",
    "print([coef for coef in clf.coefs_])"
   ],
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "384e3baf806aa87e"
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
